home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 27
/
CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso
/
CUCD
/
Sound
/
SPlayer
/
Socks5
/
examples
/
multiple_server.example
next >
Wrap
Text File
|
1997-06-18
|
5KB
|
137 lines
File Name: multiple_server.example
1. Example - Multiple socks5 Servers with socks5 Username/Password
authentication
# This example describes a socks5 environment on network 163.201.56., with:
# - two socks5 servers: serverA:3000 and serverB:2000 using Username/Password
# Authentication
# - one socks client, clientA using socks5 Username/Password authentication
# This example assumes no special build option requirements.
#
# ClientA has two socks5 users: userA and userB
#
# userA and userB must use the socks5 serverA:3000 for all commands to
# destination 163.201.56.12
#
# Both users use serverB:2000 for ping or traceroute commands to any
# destination on 163.201.56, except 163.201.56.12.
#
# Both users use serverA:3000 for any command to any destination, except
# 163.201.56.12 on the 163.201.56 network.
#
---------
| serverB |
| |
---------
|
--------- --------------- ----------
| clientA | | 163.201.56. | | serverA |
| |---------------| Network |-------| |
--------- --------------- ----------
userA: socks5 user | |
mary: unix user | |_____
| |
------------- -------------
userB: socks5 user | Destination | | Destination |
sam: unix user | any host on | |163.201.56.12|
| 163.201.56. | | |
------------- -------------
2. Server Environment Variables
# You must tell the server where to find the configuration file. You can do so
# in one of three ways:
# - Set the environment variable SOCKS5_CONFFILE
# - Include the socks5.conf file in the default directory, usually /etc
# - Build with the --with-srvconffile=path option
# This example demonstrates using environment variables. The example path is
# arbitrary.
#serverA:3000
setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf
setenv SOCKS5_PWDFILE /socksdir/run/socks5.passwd
#serverB:2000
setenv SOCKS5_CONFFILE /socksdir/run/socks5.conf
setenv SOCKS5_PWDFILE /socksdir/run/socks5.passwd
3. Server Configuration File socks5.conf
# These are the socks5.conf files. The socks5.conf file must be in the
# directory specified in the SOCKS5_CONFFILE environment variable, or the
# default directory, usually /etc
# In this example, the socks5.conf file is the same for both
# servers. The servers can share the configuration file, if both servers can
# access it.
#serverA:3000 filename /socksdir/run/socks5.conf
auth 163.201.56. - u
permit u - 163.201.56. 163.201.56. - - userA,userB
#serverB:2000 filename /socksdir/run/socks5.conf
auth 163.201.56. - u
permit u - 163.201.56. 163.201.56. - - userA,userB
4. Server socks5 Password File
# This is the socks5 Username/Password file. It should be in the directory
# specified in the SOCKS5_PWDFILE environment variable, or the default
# directory, usually /etc
#
# To add more users, place each user on a new line with username and
# password separated by white space.
userA passA
userB passB
5. Runtime mode
# To start the socks5 daemons in standalone mode on serverA on bindport 3000,
# at the command prompt, type:
# ./socks5 -b 3000
#
# To start the socks5 daemons in standalone mode on serverB on bindport 2000,
# at the command prompt, type:
# ./socks5 -b 2000
6. Client Configuration File libsocks5.conf
# When the server and client are on the same network, it is most efficient to
# run the client without a configuration file. We include the configuration
# file in this example to show how to control which server the client uses in
# a multiple socks5 server environment.
#
# This is the libsocks5.conf configuration file for clientA. It should be in the
# directory specified in the build, or in the default directory, usually /etc
#
# The order of proxy lines is crucial to achieve the desired results. In this
# example, if the third line were first, any command to destination 163.201.56
# would use serverA:3000.
socks5 - 163.201.56.12 - mary,sam serverA:3000 #mary and sam are unix user ids
socks5 p,t 163.201.56. - mary,sam serverB:2000 #mary and sam are unix user ids
socks5 - 163.201.56. - mary,sam serverA:3000 #mary and sam are unix user ids
7. Client Environment Variables
# Set the environment variables for the socks5 user userA. Setting the
# SOCKS5_NONETMASKCHECK environment variable forces the client to read the
# configuration file.
# At the command prompt, type:
setenv SOCKS5_NONETMASKCHECK
setenv SOCKS5_USER userA
setenv SOCKS5_PASSWD passA
#Set the environment variables for the socks5 user userB
#At the command prompt, type:
setenv SOCKS5_NONETMASKCHECK
setenv SOCKS5_USER userB
setenv SOCKS5_PASSWD passB